{% extends "./layout/base.html" %}
{% block header %}
Docker镜像
{% endblock %}

{% block main %}
<div class="row">
    <div class="col-md-12">
        <!-- Advanced Tables -->
        <div class="panel panel-default">
            <div class="panel-heading">
                镜像列表
            </div>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                        <thead>
                        <tr>
                            <th>镜像</th>
                            <th>版本</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% for re in reqs %}
                            {% if loop.index % 2 == 0%}
                                <tr class="odd gradeX">
                                    <td><a href="/{{ re.name }}/{{re.tag}}">{{ re.name }}</a></td>
                                    <td><a href="/{{ re.name }}/{{re.tag}}">{{ re.tag }}</a></td>
                                    <td class="center">删除</td>
                                </tr>
                            {% else %}
                                <tr class="even gradeX">
                                    <td><a href="/{{ re.name }}/{{re.tag}}">{{ re.name }}</a></td>
                                    <td><a href="/{{ re.name }}/{{re.tag}}">{{ re.tag }}</a></td>
                                    <td class="center">删除</td>
                                </tr>
                            {% endif %}
                        {% else %}
                        <tr class="gradeX" colspan="3">
                            没有数据
                        </tr>
                        {% endfor %}

                        </tbody>
                    </table>
                </div>

            </div>
        </div>
        <!--End Advanced Tables -->
    </div>
</div>
{% endblock %}

{% block script %}
<script src="/assets/js/dataTables/jquery.dataTables.js"></script>
<script src="/assets/js/dataTables/dataTables.bootstrap.js"></script>
<script>
    $(document).ready(function () {
        $('#dataTables-example').dataTable();
    });
</script>
{% endblock %}

{% block style %}
<!-- TABLE STYLES-->
<link href="/assets/js/dataTables/dataTables.bootstrap.css" rel="stylesheet" />

{% endblock%}